package com.coal.exam.web;

import com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class IndexController {
    @Autowired
    ExerciseService exerciseService;

    /*
      *@Author zhangBo
      *@Since ver 1.0
      *@Date 17-8-29 下午5:48
      *@Description
      */
    @RequestMapping("index")
    public Object get(@RequestParam(required = false) String cookie){
        Map<String,Object> result = Maps.newHashMap();
        try {
            exerciseService.get();
        } catch (Exception e) {
            e.printStackTrace();
        }
        result.put("msg","正在获取试题...");
        return result;
    }
}
